import {
  BaseEntity,
  Column,
  Entity,
  PrimaryColumn,
  PrimaryGeneratedColumn,
} from 'typeorm'

// 资产盘点详情表
@Entity({ name: 'inventory_details' })
export class InventoryDetails extends BaseEntity {
  // 自增主键
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number

  // 盘点申请编号
  @PrimaryColumn({
    type: 'varchar',
    name: 'inventoryCode',
  })
  inventoryCode: string

  // 盘点资产编码
  @Column({
    type: 'varchar',
    name: 'inventoryAssetCode',
  })
  inventoryAssetCode: string

  // 资产状态 0 待盘点 1 盘亏 盘亏出库  2 盘盈 新增一条 盘盈入库 3 已盘点
  @Column({
    type: 'varchar',
    name: 'inventoryAssetStatus',
  })
  inventoryAssetStatus: string

  // 盘点日期
  @Column({
    type: 'varchar',
    name: 'inventoryDate',
    nullable: true,
  })
  inventoryDate: string

  // 备注
  @Column({
    type: 'varchar',
    name: 'remark',
    nullable: true,
  })
  remark: string

  // 是否删除
  @Column({
    type: 'tinyint',
    name: 'isDelete',
    nullable: true,
  })
  isDelete: boolean
}
